package jjn.kamacoder.case13;

import java.util.Objects;
import java.util.Scanner;

/**
 * @author Jiang Jining
 * @since 2023-08-30 21:40
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String c = sc.next();
            if (Objects.equals(c, "@")) {
                break;
            }
            int n = sc.nextInt();
            for (int i = 1; i < n; i++) {
                for (int j = n - i; j > 0; j--) {
                    System.out.print(" ");
                }
                System.out.print(c);
                for (int j = 0; j < 2 * i - 3; j++) {
                    System.out.print(" ");
                }
                if (i > 1) {
                    System.out.print(c);
                }
                System.out.println();
            }
            for (int i = 1; i <= 2 * n - 1; i++) {
                System.out.print(c);
            }
            System.out.println();
            System.out.println();
        }
    }
}
